home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 2.1 KB | 76 lines | [TEXT/GEOL] |
- Item forwarded by A33 to A34
-
- Item 3411204 9-Nov-89 01:00
-
- From: BEL0076 Hermes Systems SA
-
- To: MACDTS Macintosh Developer Tech. Supt.
-
- cc: MACAPP.TECH$ MacApp Technical
- BEL0076 Hermes Systems SA
-
- Sub: Menu bug from rez or Postrez
-
- Hello,
-
- Using MacApp 2.0ß9 and MPW 3.0.
- When -d variable is used in a menu, this causes a bug if the -d variables
- includes all the items of the menu till the last menu item.
- The resulting bug is that the last item in the menu is always disabled or
- activate another menu command.
-
-
- Example of bad code ( modified from drawshapes )
- In this code,the cLtGray item is always disabled ( Look at the .r file )
-
- resource 'cmnu' (5) {
- 5,
- textMenuProc,
- allEnabled,
- enabled,
- "Shades",
- { /* array: 5 elements */
- /* [1] */ "White",noIcon, noKey, noMark, plain, cWhite;
- /* [2] */ "25% Shading", noIcon, noKey, noMark, plain, cLtGray
- #IF qTestVariable
- ;
- /* [3] */ "50% Shading", noIcon, noKey, noMark, plain, cGray;
- /* [4] */ "75% Shading", noIcon, noKey, noMark, plain, cDkGray;
- /* [5] */ "100% Shading", noIcon, noKey, noMark, plain, cBlack
- #EndIf
- }
- };
-
- Example of running code :
-
- resource 'cmnu' (5) {
- 5,
- textMenuProc,
- allEnabled,
- enabled,
- "Shades",
- { /* array: 5 elements */
- /* [1] */ "White",noIcon, noKey, noMark, plain, cWhite;
- /* [2] */ "25% Shading", noIcon, noKey, noMark, plain, cLtGray;
- #IF qTestVariable
- /* [3] */ "50% Shading", noIcon, noKey, noMark, plain, cGray;
- #EndIf
- /* [4] */ "75% Shading", noIcon, noKey, noMark, plain, cDkGray;
- /* [5] */ "100% Shading", noIcon, noKey, noMark, plain, cBlack
- }
- };
-
-
- Note : Do not forget to define the qTestVariable in your build file.
-
- So it seems that the , or ; is not well processed by rez or Postrez when there
- is a test on a -d variable in a 'cmnu' resource file.
-
- Please send me your suggestions to solve the problem of managing different
- menus under -d variables.
-
- Thank you very much.
-
- Philippe Lange
-
-